package com.crop.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 二维码表
 * </p>
 *
 * @author 作者
 * @since 2025-02-04
 */
@Getter
@Setter
@TableName("qrcode")
@ApiModel(value = "Qrcode对象", description = "二维码表")
public class Qrcode implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("批次ID")
    @TableField("batch_id")
    private Long batchId;

    @ApiModelProperty("二维码内容")
    @TableField("code")
    private String code;

    @ApiModelProperty("加密参数")
    @TableField("encryption_params")
    private String encryptionParams;

    @ApiModelProperty("有效期")
    @TableField("valid_until")
    private LocalDateTime validUntil;

    @ApiModelProperty("扫描次数")
    @TableField("scan_count")
    private Integer scanCount;

    @ApiModelProperty("状态：0-无效 1-有效")
    @TableField("status")
    private Integer status;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @TableField("deleted")
    private Boolean deleted;


}
